﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace watchWeb
{
    class GetConfig
    {
        public GetConfig() { }
        public GetConfig(string path)
        {
            m_path = path;
            doc.Load(m_path);
        }
        public void SetPath(string path)
        {
            m_path = path;
            doc.Load(m_path);
        }

        public string[] GetKeyWord()
        {
            XmlElement root = doc.DocumentElement;
            XmlNode node = root.SelectSingleNode("/info/keyword");
            return node.InnerText.Split('|');
            /*
            foreach (XmlNode node in listNodes)
            {
                Console.WriteLine(node.SelectSingleNode("name").InnerText);
                Console.WriteLine(node.InnerText);
            }
            string strXueLi = "北京大学/本科/4年#清华大学/研究生/3年#麻省理工学院/博士/2年";
            string[] strXueLiArr = strXueLi.Split('#');
            return strXueLiArr;*/
        }

        private string m_path;
        private XmlDocument doc = new XmlDocument();
    }
}
